woogc/ps/interfaces/sync_to_shop
Name: woogc/ps/interfaces/sync_to_shop
Type: Filter
Arguments: $status, $remote_blog_id, $post
The filter can be used to change the synchronization interface button status from active to inactive or vice versa.
For example, when creating a new product, the buttons will show up active as default:
add_filter ( 'woogc/ps/interfaces/sync_to_shop', 'woogc_ps_interfaces_option_status', 10, 3 ); add_filter ( 'woogc/ps/interfaces/maintain_child', 'woogc_ps_interfaces_option_status', 10, 3 ); add_filter ( 'woogc/ps/interfaces/maintain_categories', 'woogc_ps_interfaces_option_status', 10, 3 ); add_filter ( 'woogc/ps/interfaces/maintain_stock', 'woogc_ps_interfaces_option_status', 10, 3 ); function woogc_ps_interfaces_option_status( $status, $remote_blog_id, $post ) { //if nnew product post, set to enabled if ( $post->post_status == 'auto-draft' ) $status = TRUE; return $status; }
The code should be placed inside a php file on wp-content/mu-plugins folder.